$(document).ready(function () {
    $('.nav_content_item').click(function () {
        $('.nav_content_item').find('span').removeClass('nav_span_select').removeClass('nav_span_unselect');
        $(this).find('span').addClass('nav_span_select');
        $('.nav_content_item').not(this).find('span').addClass('nav_span_unselect');
        let index = $(this).data("index");
        switch (index) {
            case 0:
                var url = "../index.html";
                window.open(url, '_blank');
                break;
            case 1:
                var url = "../html/survey.html";
                window.open(url, '_blank');
                break;
            case 2:
                var url = "../html/brand.html";
                window.open(url, '_blank');
                break;
            case 3:
                var url = "../html/knowledge.html";
                window.open(url, '_blank');
                break;
            case 4:
                var url = "../html/forum.html";
                window.open(url, '_blank');
                break;
        }

    });
    $('.menu_box_item').click(function () {
        $('.menu_box_item').removeClass('menu_box_item_select');
        $(this).addClass('menu_box_item_select');
        $('.menu_box_item').not(this).removeClass('menu_box_item_select');
    });
    $('.unfold_all').click(function () {
        $('.menu_box_item').removeClass('menu_box_item_select');
        $('.menu_box_item').addClass('menu_box_item_select');
    });
    $("#listPagination").pagination(50,    //分布总数量，必须参数
        {
            callback: PageCallback,  //PageCallback() 为翻页调用次函数。
            prev_text: "<",
            next_text: ">",
            items_per_page: 5,
            num_edge_entries: 2,       //两侧首尾分页条目数
            num_display_entries: 10,    //连续分页主体部分分页条目数
            current_page: 0,   //当前页索引
            link_to: "?id=__id__"  //分页的js中会自动把"__id__"替换为当前的数。0　
        }
    );
    $("#listPagination2").pagination(50,    //分布总数量，必须参数
        {
            callback: PageCallback,  //PageCallback() 为翻页调用次函数。
            prev_text: "<",
            next_text: ">",
            items_per_page: 5,
            num_edge_entries: 2,       //两侧首尾分页条目数
            num_display_entries: 10,    //连续分页主体部分分页条目数
            current_page: 0,   //当前页索引
            link_to: "?id=__id__"  //分页的js中会自动把"__id__"替换为当前的数。0　
        }
    );
    $(".invitation_item").click(function () {
        $('.invitation_item').removeClass('invitation_item_select');
        $(this).addClass('invitation_item_select');
        $('.nav_content_item').not(this).removeClass('invitation_item_select');
    })
    $(".spread").click(function (){
        let dom_p = $(this).parent().parent().find('p');
        $(dom_p).css('height','max-content')
    });
    $("#invitationList").pagination(50,    //分布总数量，必须参数
        {
            callback: PageCallback,  //PageCallback() 为翻页调用次函数。
            prev_text: "<",
            next_text: ">",
            items_per_page: 5,
            num_edge_entries: 2,       //两侧首尾分页条目数
            num_display_entries: 10,    //连续分页主体部分分页条目数
            current_page: 0,   //当前页索引
            link_to: "?id=__id__"  //分页的js中会自动把"__id__"替换为当前的数。0　
        }
    );
});

function PageCallback(page_index, jq) {

}
